{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
 <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="get">	
                <div class="box-header with-border">
                    <span class="fa fa-search" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">查询</p>
                </div>
                   <div class="box-body">
                        <div class="col-md-2 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-4 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
							   申购人：
						  </label>
						  <div class="input-group col-md-8 col-xs-12">
							   <select class="form-control" name="shops_name">
									 <option value="">全部</option>	
							   {%foreach from=$shops_names key=key item=value%}
									  <option value="{%$value.user_name%}" {%if $value.user_name == $shops_name%}selected{%/if%}>{%$value.user_name%}</option>
							   {%/foreach%}
                                </select>
						  </div> 
				    </div>
					<div class="col-md-2 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-5 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   采购单位：
						  </label>
						  <div class="input-group col-md-7 col-xs-12">
							   <select class="form-control" name="shops_id">
									<option value="" >全部</option>	
							   {%foreach from=$shops_lists key=key item=value%}
									<option value="{%$value.shops_id%}" {%if $value.shops_id == $shops_id%}selected{%/if%}>{%$value.shops_com%}</option>
							   {%/foreach%}
									  
                                </select>
						  </div> 
				    </div>
					<div class="col-md-5 col-xs-12 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-3 control-label text-right" style=" font-weight:500; ">
							   时间：
						  </label>
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
							     <div class="input-group-addon" style="padding:6px 7px;">
									<i class="fa fa-calendar"></i>
								 </div>
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>						  
				    </div>
                    <div class="col-md-2 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-6 control-label text-right" style=" font-weight:500; margin:0;">
							   结算类型：
						  </label>
						  <div class="input-group col-md-6 col-xs-12">
							   <select class="form-control" name="is_show">
									  <option value="" >全部</option>
									{%foreach from=$is_shows key=key item=value%}
									  <option value="{%$key%}"{%if $key==$is_show%}selected{%/if%}>{%$value%}</option>
									{%/foreach%}
								
                                </select>
						  </div> 
				    </div>
					<div class="col-md-1 col-xs-12">
					   <input type="hidden" name="a" value="shops.demandlist">
					   <button type="submit" class="btn btn-warning">查 询</button>
					</div>
					<div style="clear:both; height:10px;"></div>
                        <table class="table table-bordered" id="mytable">
                                <thead>
                                    <tr>
                                        <td>申购人</td>
                                        <td>完成日期</td>
                                        <td>采购单位</td>
                                        <td>采购内容</td>
                                        <td>结算类型</td>
										<td>备注</td>
										<td width="90">操作</td>
                                    </tr>
                                </thead>
                                <tbody>
								{%foreach from=$shop_lists key=key item=value%}
                                    <tr>
									    <td>{%$value.user_name%}</td>
                                        <td>{%$value.accomplish_time%}</td>
                                        <td>{%$value.shops_com%}</td>
                                        <td>{%$value.shop_content%}</td>
                                        <td>{%$value.is_show%}</td>
										<td>{%$value.shop_remark%}</td>
										<td>
                                        	<a href="index.php?a=shops.ProcurementDetails&shop_id={%$value.shop_id%}&shops_type=chaxun
&is_show=1" class="btn btn-success btn-xs">查 看</a>
                                        </td>
                                    </tr>
								{%/foreach%}
                            </tbody>
                        </table>                     
				   </div><!--box-body -->
               </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
</script>
